package com.pengxun.manager.dao.system;

import com.pengxun.manager.model.system.Permission;
import com.pengxun.manager.vo.PermissionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PermissionDao {
   public int insert(Permission permission);
   
   public int update(Permission permission);
   
   public int delete(@Param("permissionId") Integer permissionId);
   public int deleteByMenuCode(@Param("menuCode") String menuCode);
   
   public List<Permission> findByPage(PermissionVO permission);
   
   public Permission findByPermissionId(@Param("permissionId") Integer permissionId);
   public Permission findByPermissionCode(@Param("permissionCode") String permissionCode);
   public List<Permission> findByMenuCode(@Param("menuCode") String menuCode);
   public Permission selectLastPermission();
   public int updateStatus(@Param("permissionId") Integer permissionId,@Param("status") Integer status);

   public int deleteAll();
}
